<?php
class CCustomFormValidator {
	
	public function checkUserName($userName)
	{
		$userModel = new baseUserModel();
		return $userModel->checkUserName($userName)?false:true;
	}
	
	public function checkMainCard($mainCard, $id=0)
	{
		if($id==0)
		{
			$id = isset($_GET["id"])?$_GET["id"]:0;
		}
		$userModel = new ownerModel();
		return $userModel->checkCard($mainCard,"main_card",$id)?false:true;
	}
	
	public function checkSupplementaryCard($Card, $id=0)
	{
		if($id==0)
		{
			$id = isset($_GET["id"])?$_GET["id"]:0;
		}
		$userModel = new ownerModel();
		return $userModel->checkCard($Card,"supplementary_card",$id)?false:true;
	}
	
	public function checkOwnerUserName($userName, $id=0)
	{
		if($id==0)
		{
			$id = isset($_GET["id"])?$_GET["id"]:0;
		}
		$userModel = new ownerModel();
		return $userModel->checkUserName($userName, $id)?false:true;
	}
	
	public function checkShopUserName($userName, $id=0)
	{
		/* if($id==0)
		{
			$id = isset($_GET["id"])?$_GET["id"]:0;
		} */
		$userModel = new shopModel();
		return $userModel->checkUserName($userName, $id)?false:true;
	}
	
	/**
	 * 社区新增/修改验证
	 * @return array rules
	 */
	public static function communityValidator()
	{
		return array(
				"txt_community_name"=>array(
						"formValidator"=>array("tipid"=>"txt_community_name_tip","empty"=>"false","onshow"=>"请输入社区名","onfocus"=>"请输入社区名","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"社区名不能为空")
				),
				"hidPca"=>array(
						"formValidator"=>array("tipid"=>"txt_pca_tip","empty"=>"false","onshow"=>"请选择所在省市区","onfocus"=>"请选择所在省市区","oncorrect"=>"选择正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"请选择所在省市区")
				),
				"txt_address"=>array(
						"formValidator"=>array("tipid"=>"txt_address_tip","empty"=>"false","onshow"=>"请输入详细的地址(不用输入省市区)","onfocus"=>"请输入详细的地址(不用输入省市区)","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"地址不能为空")
				),
				"txt_contact"=>array(
						"formValidator"=>array("tipid"=>"txt_contact_tip","empty"=>"false","onshow"=>"请输入联系人","onfocus"=>"请输入联系人","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"联系人不能为空")
				),
				"txt_phone"=>array(
						"formValidator"=>array("tipid"=>"txt_phone_tip","empty"=>"false","onshow"=>"请输入联系电话","onfocus"=>"请输入联系电话","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"联系电话不能为空")
				)
		);
	}
	
	/**
	 * 业主验证规则
	 * @param int $id
	 */
	public static function ownerValidator($id=0)
	{
		$id = $id?"&id=".$id:"";
		$manageDomain = Config::get("manageDomain");
		$arr = array(
				"txt_owner_name"=>array(
						"formValidator"=>array("tipid"=>"txt_owner_name_tip","empty"=>"false","onshow"=>"请输入真实姓名","onfocus"=>"请输入真实姓名","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"真实姓名不能为空")
				),
				"txt_phone"=>array(
						"formValidator"=>array("tipid"=>"txt_phone_tip","empty"=>"false","onshow"=>"请输入联系电话","onfocus"=>"请输入联系电话","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"联系电话不能为空")
				),
				"txt_id_card"=>array(
						"formValidator"=>array("tipid"=>"txt_id_card_tip","empty"=>"false","onshow"=>"请输入身份证号","onfocus"=>"请输入身份证号","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"身份证号不能为空"),
						"regexValidator" => array("datatype"=>"enum","regexp"=>"idcard","onerror"=>"身份证格式错误")
				),
				"hidCo"=>array(
						"formValidator"=>array("tipid"=>"txt_community_id_tip","empty"=>"false","onshow"=>"请选择所属社区","onfocus"=>"请选择所属社区","oncorrect"=>"选择正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"所属社区不能为空")
				),
				"txt_address"=>array(
						"formValidator"=>array("tipid"=>"txt_address_tip","empty"=>"false","onshow"=>"请输入联系地址","onfocus"=>"请输入联系地址","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"联系地址不能为空")
				)
		);
		
		//if($id==0)
		//{
			$arr["txt_main_card"] = array(
						"formValidator"=>array("tipid"=>"txt_main_card_tip","empty"=>"false","onshow"=>"请输入主卡卡号","onfocus"=>"请输入主卡卡号","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"主卡卡号不能为空")
						//"ajaxValidator"=>array("url"=>$manageDomain."ownerManage/checkCard/?isAjax=1".$id,"success"=>"function(data){if(data==-1000){alert('没有权限');return false;}else if(data==1){return true;}return false;}","onwait"=>"正在检查卡号是否重复...","onerror"=>"卡号已经存在","serverValidateClass"=>"CCustomFormValidator","serverValidateFun"=>"checkMainCard")
				);
			$arr["txt_supplementary_card"]=array(
						"formValidator"=>array("tipid"=>"txt_supplementary_card_tip","empty"=>"false","onshow"=>"请输入附属卡卡号后12位","onfocus"=>"请输入附属卡卡号后12位","oncorrect"=>"输入正确"),
						"regexValidator" => array(
                    		"regexp" => "^[0-9]{12}$",
                    		"onerror" => "卡号必须为12位数字"
                		),
						"ajaxValidator"=>array("url"=>$manageDomain."ownerManage/checkCard/?isAjax=1".$id,"success"=>"function(data){if(data==-1000){alert('没有权限');return false;}else if(data==1){return true;}return false;}","onwait"=>"正在检查卡号是否重复...","onerror"=>"卡号已经存在","serverValidateClass"=>"CCustomFormValidator","serverValidateFun"=>"checkSupplementaryCard")
				);
		//}
		
		return $arr;
	}
	
	/**
	 * 商户验证规则
	 * @param int $id
	 * @return array
	 */
	public static function shopValidator($id=0)
	{
		$manageDomain = Config::get("manageDomain");
		$arr = array(
				"txt_shop_name"=>array(
						"formValidator"=>array("tipid"=>"txt_shop_name_tip","empty"=>"false","onshow"=>"请输入商户名称","onfocus"=>"请输入商户名称","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"商户名称不能为空")
				),
				"txt_shop_simple_name"=>array(
						"formValidator"=>array("tipid"=>"txt_shop_simple_name_tip","empty"=>"false","onshow"=>"请输入商户简称","onfocus"=>"请输入商户简称","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"商户简称不能为空")
				),
				/*"txt_back_account"=>array(
						"formValidator"=>array("tipid"=>"txt_back_account_tip","empty"=>"false","onshow"=>"请输入银行结算账号","onfocus"=>"请输入银行结算账号","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"银行结算账号不能为空")
				),*/
				"txt_contact"=>array(
						"formValidator"=>array("tipid"=>"txt_contact_tip","empty"=>"false","onshow"=>"请输入联系人","onfocus"=>"请输入联系人","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"联系人不能为空")
				),
				"txt_phone"=>array(
						"formValidator"=>array("tipid"=>"txt_phone_tip","empty"=>"false","onshow"=>"请输入联系电话","onfocus"=>"请输入联系电话","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"联系电话不能为空")
				)
		);
		
		if(!$id)
		{
			$arr["txt_user_name"]=array(
						"formValidator"=>array("tipid"=>"txt_user_name_tip","empty"=>"false","onshow"=>"用户名由6-16位数字、字母或下划线组成","onfocus"=>"请输入用户名,格式为6-16位数字、字母或下划线","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"用户名不能为空"),
						"regexValidator" => array(
                    		"regexp" => "^[0-9a-zA-Z_]{6,16}$",
                    		"onerror" => "用户名必须由6-16位数字、字母或下划线组成"
                		),
                		"ajaxValidator"=>array("url"=>$manageDomain."shopManage/checkUserName/?isAjax=1","success"=>"function(data){if(data==-1000){alert('没有权限');return false;}else if(data==1){return true;}return false;}","onwait"=>"正在检查用户名是否重复...","onerror"=>"用户名已经存在","serverValidateClass"=>"CCustomFormValidator","serverValidateFun"=>"checkShopUserName")
				);
		}
		
		return $arr;
	}
	
	/**
	 * 商户/业主第一次登陆时修改密码
	 */
	public static function firstLoginValidator($ownerID=0)
	{
		$arr = array(
			"txt_user_pwd" => array(
					"formValidator" => array("tipid" => "txt_user_pwd_tip", "empty" => "false", "onshow" => "密码必须由6-16位数字、字母或下划线组成", "onfocus" => "请输入登陆密码", "oncorrect" => "输入正确"),
					"inputValidator" => array(
							"min" => "6",
							"max" => "16",
							"onerror" => "密码长度必须在6-16之间"
					),
					"regexValidator" => array(
							"regexp" => "^[0-9a-zA-Z_]{6,16}$",
							"onerror" => "密码格式不正确,必须由6-16位数字、字母或下划线组成"
					)
			),
			"txt_user_repwd" => array(
					"formValidator" => array("tipid" => "txt_user_repwd_tip", "empty" => "false", "onshow" => "密码必须由6-16位数字、字母或下划线组成", "onfocus" => "请输入确认密码", "oncorrect" => "输入正确"),
					"inputValidator" => array(
							"min" => "6",
							"max" => "16",
							"onerror" => "确认密码长度必须在6-16之间"
					),
					"regexValidator" => array(
							"regexp" => "^[0-9a-zA-Z_]{6,16}$",
							"onerror" => "密码格式不正确,必须由6-16位数字、字母或下划线组成"
					),
					"compareValidator" => array(
							"desid" => "txt_user_pwd",
							"operateor" => "=",
							"onerror" => "2次密码不一致,请确认"
					)
			),
			"txt_pay_pwd" => array(
					"formValidator" => array("tipid" => "txt_pay_pwd_tip", "empty" => "false", "onshow" => "请输入6位数字的账户密码", "onfocus" => "请输入6位数字的账户密码", "oncorrect" => "输入正确"),
					"regexValidator" => array(
							"regexp" => "^[0-9]{6}$",
							"onerror" => "格式不正确,账户密码必须是6位数字"
					)
			),
			"txt_pay_repwd" => array(
					"formValidator" => array("tipid" => "txt_pay_repwd_tip", "empty" => "false", "onshow" => "请再次输入6位数字的账户密码", "onfocus" => "请再次输入6位数字的账户密码", "oncorrect" => "输入正确"),
					"regexValidator" => array(
							"regexp" => "^[0-9]{6}$",
							"onerror" => "格式不正确,账户密码必须是6位数字"
					),
					"compareValidator" => array(
							"desid" => "txt_pay_pwd",
							"operateor" => "=",
							"onerror" => "2次密码不一致,请确认"
					)
			)
		);
		
		if($ownerID)
		{
			$arr["txt_user_name"]=array(
						"formValidator"=>array("tipid"=>"txt_user_name_tip","empty"=>"false","onshow"=>"用户名由6-16位数字、字母或下划线组成","onfocus"=>"请输入用户名,格式为6-16位数字、字母或下划线","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"用户名不能为空"),
						"regexValidator" => array(
                    		"regexp" => "^[0-9a-zA-Z_]{6,16}$",
                    		"onerror" => "用户名必须由6-16位数字、字母或下划线组成"
                		),
                		"ajaxValidator"=>array("url"=>"/owner/index/checkUserName/?isAjax=1&id=".$ownerID,"success"=>"function(data){if(data==-1000){window.location.href='/';return false;}else if(data==1){return true;}return false;}","onwait"=>"正在检查用户名是否重复...","onerror"=>"用户名已经存在","serverValidateClass"=>"CCustomFormValidator","serverValidateFun"=>"checkOwnerUserName")
				);
			
			$arr["txt_email"]=array(
					"formValidator"=>array("tipid"=>"txt_email_tip","empty"=>"false","onshow"=>"该邮箱在您找回密码时使用,请务必正确填写","onfocus"=>"该邮箱在您找回密码时使用,请务必正确填写","oncorrect"=>"输入正确"),
					"inputValidator"=>array("min"=>"1","onerror"=>"邮箱不能为空"),
					"regexValidator" => array(
							"datatype"=>"enum",
							"regexp" => "email",
							"onerror" => "邮箱格式不正确"
					)		
				);
		}
		
		return $arr;
	}
	
	/**
	 * 商户修改登录密码
	 */
	public static function changePwdValidator()
	{
		return array(
			"txt_old_pwd" => array(
					"formValidator" => array("tipid" => "txt_old_pwd_tip", "empty" => "false", "onshow" => "密码必须由6-16位数字、字母或下划线组成", "onfocus" => "请输入登陆密码", "oncorrect" => "输入正确"),
					"inputValidator" => array(
							"min" => "6",
							"max" => "16",
							"onerror" => "密码长度必须在6-16之间"
					),
					"regexValidator" => array(
							"regexp" => "^[0-9a-zA-Z_]{6,16}$",
							"onerror" => "密码格式不正确,必须由6-16位数字、字母或下划线组成"
					)
			),
			"txt_user_pwd" => array(
					"formValidator" => array("tipid" => "txt_user_pwd_tip", "empty" => "false", "onshow" => "密码必须由6-16位数字、字母或下划线组成", "onfocus" => "请输入登陆密码", "oncorrect" => "输入正确"),
					"inputValidator" => array(
							"min" => "6",
							"max" => "16",
							"onerror" => "密码长度必须在6-16之间"
					),
					"regexValidator" => array(
							"regexp" => "^[0-9a-zA-Z_]{6,16}$",
							"onerror" => "密码格式不正确,必须由6-16位数字、字母或下划线组成"
					)
			),
			"txt_user_repwd" => array(
					"formValidator" => array("tipid" => "txt_user_repwd_tip", "empty" => "false", "onshow" => "密码必须由6-16位数字、字母或下划线组成", "onfocus" => "请输入确认密码", "oncorrect" => "输入正确"),
					"inputValidator" => array(
							"min" => "6",
							"max" => "16",
							"onerror" => "确认密码长度必须在6-16之间"
					),
					"regexValidator" => array(
							"regexp" => "^[0-9a-zA-Z_]{6,16}$",
							"onerror" => "密码格式不正确,必须由6-16位数字、字母或下划线组成"
					),
					"compareValidator" => array(
							"desid" => "txt_user_pwd",
							"operateor" => "=",
							"onerror" => "2次密码不一致,请确认"
					)
			)
		);
	}
	
	/**
	 * 商户修改账户密码
	 */
	public static function changePayPwdValidator()
	{
		return array(
				"txt_old_pwd" => array(
						"formValidator" => array("tipid" => "txt_old_pwd_tip", "empty" => "false", "onshow" => "请输入6位数字的原账户密码", "onfocus" => "请输入6位数字的原账户密码", "oncorrect" => "输入正确"),
						"regexValidator" => array(
								"regexp" => "^[0-9]{6}$",
								"onerror" => "格式不正确,原账户密码必须是6位数字"
						)
				),
				"txt_user_pwd" => array(
						"formValidator" => array("tipid" => "txt_user_pwd_tip", "empty" => "false", "onshow" => "请输入6位数字的账户密码", "onfocus" => "请输入6位数字的账户密码", "oncorrect" => "输入正确"),
						"regexValidator" => array(
								"regexp" => "^[0-9]{6}$",
								"onerror" => "格式不正确,账户密码必须是6位数字"
						)
				),
				"txt_user_repwd" => array(
						"formValidator" => array("tipid" => "txt_user_repwd_tip", "empty" => "false", "onshow" => "请输入6位数字的账户密码", "onfocus" => "请输入6位数字的账户密码", "oncorrect" => "输入正确"),
						"regexValidator" => array(
								"regexp" => "^[0-9]{6}$",
								"onerror" => "格式不正确,账户密码必须是6位数字"
						),
						"compareValidator" => array(
								"desid" => "txt_user_pwd",
								"operateor" => "=",
								"onerror" => "2次密码不一致,请确认"
						)
				)
		);
	}
	
	/**
	 * 供应商
	 * @return array rules
	 */
	public static function supplierValidator()
	{
		return array(
				"txt_s_name"=>array(
						"formValidator"=>array("tipid"=>"txt_s_name_tip","empty"=>"false","onshow"=>"请输入供应商名称","onfocus"=>"请输入供应商名称","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"供应商名称不能为空")
				)
		);
	}
	
	/**
	 * 商户-注册信息维护
	 * @return array rules
	 */
	public static function shopEditValidator()
	{
		return array(
				/*"txt_back_account"=>array(
						"formValidator"=>array("tipid"=>"txt_back_account_tip","empty"=>"false","onshow"=>"请输入银行结算账号","onfocus"=>"请输入银行结算账号","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"银行结算账号不能为空")
				),*/
				"txt_contact"=>array(
						"formValidator"=>array("tipid"=>"txt_contact_tip","empty"=>"false","onshow"=>"请输入联系人","onfocus"=>"请输入联系人","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"联系人不能为空")
				),
				"txt_phone"=>array(
						"formValidator"=>array("tipid"=>"txt_phone_tip","empty"=>"false","onshow"=>"请输入联系电话","onfocus"=>"请输入联系电话","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"联系电话不能为空")
				)
		);
	}
	
	/**
	 * 业主-注册信息维护
	 * @return array rules
	 */
	public static function ownerEditValidator()
	{
		return array(
				"txt_mail"=>array(
						"formValidator"=>array("tipid"=>"txt_mail_tip","empty"=>"false","onshow"=>"该邮箱在您找回密码时使用,请务必正确填写","onfocus"=>"该邮箱在您找回密码时使用,请务必正确填写","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"邮箱不能为空"),
						"regexValidator" => array(
								"datatype"=>"enum",
								"regexp" => "email",
								"onerror" => "邮箱格式不正确"
						)
				),
				"txt_address"=>array(
						"formValidator"=>array("tipid"=>"txt_address_tip","empty"=>"false","onshow"=>"请输入联系地址","onfocus"=>"请输入联系地址","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"联系地址不能为空")
				),
				"txt_phone"=>array(
						"formValidator"=>array("tipid"=>"txt_phone_tip","empty"=>"false","onshow"=>"请输入联系电话","onfocus"=>"请输入联系电话","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"7","onerror"=>"请输入正确的联系电话")
				)
		);
	}
	
	/**
	 * 修改业主登录密码
	 */
	public static function changeOwnerPwdValidator()
	{
		return array(
			"txt_old_pwd" => array(
					"formValidator" => array("tipid" => "txt_old_pwd_tip","validatorgroup"=>"pwdForm", "empty" => "false", "onshow" => "密码必须由6-16位数字、字母或下划线组成", "onfocus" => "请输入登陆密码", "oncorrect" => "输入正确"),
					"inputValidator" => array(
							"min" => "6",
							"max" => "16",
							"onerror" => "密码长度必须在6-16之间"
					),
					"regexValidator" => array(
							"regexp" => "^[0-9a-zA-Z_]{6,16}$",
							"onerror" => "密码格式不正确,必须由6-16位数字、字母或下划线组成"
					)
			),
			"txt_user_pwd" => array(
					"formValidator" => array("tipid" => "txt_user_pwd_tip","validatorgroup"=>"pwdForm", "empty" => "false", "onshow" => "密码必须由6-16位数字、字母或下划线组成", "onfocus" => "请输入登陆密码", "oncorrect" => "输入正确"),
					"inputValidator" => array(
							"min" => "6",
							"max" => "16",
							"onerror" => "密码长度必须在6-16之间"
					),
					"regexValidator" => array(
							"regexp" => "^[0-9a-zA-Z_]{6,16}$",
							"onerror" => "密码格式不正确,必须由6-16位数字、字母或下划线组成"
					)
			),
			"txt_user_repwd" => array(
					"formValidator" => array("tipid" => "txt_user_repwd_tip","validatorgroup"=>"pwdForm", "empty" => "false", "onshow" => "密码必须由6-16位数字、字母或下划线组成", "onfocus" => "请输入确认密码", "oncorrect" => "输入正确"),
					"inputValidator" => array(
							"min" => "6",
							"max" => "16",
							"onerror" => "确认密码长度必须在6-16之间"
					),
					"regexValidator" => array(
							"regexp" => "^[0-9a-zA-Z_]{6,16}$",
							"onerror" => "密码格式不正确,必须由6-16位数字、字母或下划线组成"
					),
					"compareValidator" => array(
							"desid" => "txt_user_pwd",
							"operateor" => "=",
							"onerror" => "2次密码不一致,请确认"
					)
			)
		);
	}
	
	
	public static function changeOwnerPayPwdValidator()
	{
		return array(
				"txt_old_pay_pwd" => array(
						"formValidator" => array("tipid" => "txt_old_pay_pwd_tip","validatorgroup"=>"payPwdForm", "empty" => "false", "onshow" => "请输入6位数字的原账户密码", "onfocus" => "请输入6位数字的原账户密码", "oncorrect" => "输入正确"),
						"regexValidator" => array(
								"regexp" => "^[0-9]{6}$",
								"onerror" => "格式不正确,原账户密码必须是6位数字"
						)
				),
				"txt_pay_pwd" => array(
						"formValidator" => array("tipid" => "txt_pay_pwd_tip","validatorgroup"=>"payPwdForm", "empty" => "false", "onshow" => "请输入6位数字的账户密码", "onfocus" => "请输入6位数字的账户密码", "oncorrect" => "输入正确"),
						"regexValidator" => array(
								"regexp" => "^[0-9]{6}$",
								"onerror" => "格式不正确,账户密码必须是6位数字"
						)
				),
				"txt_pay_repwd" => array(
						"formValidator" => array("tipid" => "txt_pay_repwd_tip","validatorgroup"=>"payPwdForm", "empty" => "false", "onshow" => "请输入6位数字的账户密码", "onfocus" => "请输入6位数字的账户密码", "oncorrect" => "输入正确"),
						"regexValidator" => array(
								"regexp" => "^[0-9]{6}$",
								"onerror" => "格式不正确,账户密码必须是6位数字"
						),
						"compareValidator" => array(
								"desid" => "txt_pay_pwd",
								"operateor" => "=",
								"onerror" => "2次密码不一致,请确认"
						)
				)
		);
	}
	
	public static function shopProductValidator()
	{
		return array("txt_p_name"=>array(
						"formValidator"=>array("tipid"=>"txt_p_name_tip","empty"=>"false","onshow"=>"请输入商户产品名称","onfocus"=>"请输入商户产品名称","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"商户产品名称不能为空")
					),
					"hidImgPath"=>array(
						"formValidator"=>array("tipid"=>"txt_pic_path_tip","empty"=>"false","onshow"=>"请选择产品图片","onfocus"=>"请选择产品图片","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"产品图片不能为空")
					)
				);
	}
	
	public static function forgetPwdValidator()
	{
		return array("txt_username"=>array(
						"formValidator"=>array("tipid"=>"txt_username_tip","empty"=>"false","onshow"=>"请输入您的用户名","onfocus"=>"请输入您的用户名","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"用户名不能为空")
					),
					"txt_mail"=>array(
						"formValidator"=>array("tipid"=>"txt_mail_tip","empty"=>"false","onshow"=>"请输入您的邮箱,新密码将发送到该邮箱","onfocus"=>"请输入您的邮箱,新密码将发送到该邮箱","oncorrect"=>"输入正确"),
						"inputValidator"=>array("min"=>"1","onerror"=>"邮箱不能为空"),
						"regexValidator" => array(
							"datatype"=>"enum",
							"regexp" => "email",
							"onerror" => "邮箱格式不正确"
						)
					)
				);
	}
}

?>